package com.zyy.observer.demo01;

/**
 * @Description: 类描述
 * @Author: zyy
 * @Date: 2023/08/05 12:28
 */
public class Client {
    public static void main(String[] args) {
        //观察者
        WeixinUser user1 = new WeixinUser("张飒");
        WeixinUser user2 = new WeixinUser("李四");
        WeixinUser user3 = new WeixinUser("王五");

        //主题
        Subject subject = new SubscriptionSubject();
        subject.attach(user1);
        subject.attach(user2);
        subject.attach(user3);

        subject.notify("您关注的公众号更新了！！！");
    }
}
